package com.hgyc.mom.base.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.*;

import com.hgyc.mom.common.annotation.Excel;
import com.hgyc.mom.core.mybatis.EQ;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * <p>
 * 单位信息
 * </p>
 *
 * @author fwj
 * @since 2025-04-22
 */
@Data
@TableName("base_unit")
@Schema(name="单位信息对象", description = "单位信息对象")
public class Unit implements Serializable
{
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(name = "$column.columnComment")
    private Long id;

    @Excel(name = "单位编码")
    @EQ
    @Schema(name = "单位编码")
    private String unitCode;

    @Excel(name = "单位名称")
    @EQ
    @Schema(name = "单位名称")
    private String unitName;

    @Excel(name = "是否主单位")
    @EQ
    @Schema(name = "是否主单位")
    private Long primaryFlag;

    @Excel(name = "与主单位换算")
    @EQ
    @Schema(name = "与主单位换算")
    private BigDecimal changeRate;

    @Excel(name = "状态")
    @EQ
    @Schema(name = "状态")
    private Integer status;

    @Excel(name = "描述")
    @EQ
    @Schema(name = "描述")
    private String description;

    @TableField(fill = FieldFill.INSERT)
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    private Long updateBy;

    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;

}
